package ch06;

class Card {
	String kind ;
	int number;
	static int width = 100;
	static int height = 250;
}

class _04_CardTest{
	public static void main(String args[]) {
		System.out.println("Card.width: " + Card.width);
		System.out.println("Card.height: " + Card.height);

		Card c1 = new Card();
		c1.kind = "Heart";
		c1.number = 7;

		Card c2 = new Card();
		c2.kind = "Spade";
		c2.number = 4;

		System.out.println("c1: " + c1.kind + ", " + c1.number + " (" + c1.width + ", " + c1.height + ")" );
		System.out.println("c2: " + c2.kind + ", " + c2.number + " (" + c2.width + ", " + c2.height + ")" );
		
		c1.width = 50;
		c1.height = 80;
		System.out.println("scale has changed.");

		System.out.println("c1: " + c1.kind + ", " + c1.number + " (" + c1.width + ", " + c1.height + ")" );
		System.out.println("c2: " + c2.kind + ", " + c2.number + " (" + c2.width + ", " + c2.height + ")" );
	}
 }
/*
Card.width: 100
Card.height: 250
c1: Heart, 7 (100, 250)
c2: Spade, 4 (100, 250)
scale has changed.
c1: Heart, 7 (50, 80)
c2: Spade, 4 (50, 80)
*/